﻿<div>
    <header>
        <h3>{{title}} Personal Info</h3>
    </header>

    <form name="personalInfoEditForm" novalidate>
        <div class="row">
            <div class="span2">
                Name:
            </div>
            <div class="span10">
                <input type="text" name="Name" data-ng-model="personalInfo.Name" required="" data-ng-maxlength="100" />
                <span class="error" data-ng-show="personalInfoEditForm.Name.$error.required">*</span>
                <span class="error" data-ng-show="personalInfoEditForm.Name.$error.maxlength">Maximum 100 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                Address:
            </div>
            <div class="span10">
                <input type="text" name="Address" data-ng-model="personalInfo.Address" data-ng-maxlength="100"/>
                <span class="error" data-ng-show="personalInfoEditForm.Address.$error.maxlength">Maximum 100 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                City:
            </div>
            <div class="span10">
                <input type="text" name="City" data-ng-model="personalInfo.City" data-ng-maxlength="50"/>
                <span class="error" data-ng-show="personalInfoEditForm.City.$error.maxlength">Maximum 50 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                State:
            </div>
            <div class="span10">
                <input type="text" name="State" data-ng-model="personalInfo.State" data-ng-maxlength="2"/>
                <span class="error" data-ng-show="personalInfoEditForm.State.$error.maxlength">Maximum 2 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                Zip Code:
            </div>
            <div class="span10">
                <input type="text" name="Zip" data-ng-model="personalInfo.Zip" data-ng-maxlength="10"/>
                <span class="error" data-ng-show="personalInfoEditForm.Zip.$error.maxlength">Maximum 10 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                Home Phone:
            </div>
            <div class="span10">
                <input type="text" name="HomePhone" data-ng-model="personalInfo.HomePhone" data-ng-maxlength="20"/>
                <span class="error" data-ng-show="personalInfoEditForm.HomePhone.$error.maxlength">Maximum 20 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                Mobile Phone:
            </div>
            <div class="span10">
                <input type="text" name="MobilePhone" data-ng-model="personalInfo.MobilePhone" data-ng-maxlength="20"/>
                <span class="error" data-ng-show="personalInfoEditForm.MobilePhone.$error.maxlength">Maximum 20 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span2">
                Email:
            </div>
            <div class="span10">
                <input type="email" name="Email" data-ng-model="personalInfo.Email" data-ng-maxlength="100"/>
                <span class="error" data-ng-show="personalInfoEditForm.Email.$error.maxlength">Maximum 100 Characters</span>
            </div>
        </div>
        <div class="row">
            <div class="span12">
                <button class="btn btn-primary" ng-disabled="personalInfoEditForm.$invalid" data-ng-click="updatePersonalInfo(personalInfo, personalInfoEditForm)">Save</button>
                &nbsp;&nbsp;
                       
                    <button class="btn btn-danger" data-ng-if="customer.id > 0" data-bs-modal="'app/partials/customerDeleteModal.html'">Delete</button>
            </div>
        </div>
    </form>
</div>
